package de.preisrobot.persistence.dao;

import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

import org.apache.log4j.Logger;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

public class AktienKurdeDaoImpl implements AktienKurseDao
{

   private static Logger logger = Logger.getLogger(AktienKurdeDaoImpl.class);

   @PersistenceContext
   private EntityManager em;

   @Override
   @Transactional(propagation = Propagation.REQUIRED)
   public void save(Object a)
   {
      if(null==a)
         return;
      
      try
      {
         em.persist(a);
      }
      catch (Exception e)
      {
         logger.error(e);
      }
   }

}
